package com.yida.wy.vote.outside.domain.request;

import com.yida.wy.common.valid.ConfirmSelect;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Arrays;

/**
 * @author lqq
 * @date 2023-03-22
 */
@ApiModel("投票楼栋选择")
public class WyVoteBuildSelectRequest implements Serializable {
	private static final long serialVersionUID = 1L;

	@ApiModelProperty("投票ID")
	@NotNull(message = "请求参数有误[voteId]为空")
	private Long voteId;

	@ApiModelProperty("地区ID")
	@NotNull(groups = ConfirmSelect.class, message = "请求参数有误[areaId]为空")
	private Long areaId;

	@ApiModelProperty("楼栋ID")
	@NotEmpty(message = "请选择要加入的楼栋")
	private Long[] buildIds;

	public Long getVoteId() {
		return voteId;
	}

	public void setVoteId(Long voteId) {
		this.voteId = voteId;
	}

	public Long getAreaId() {
		return areaId;
	}

	public void setAreaId(Long areaId) {
		this.areaId = areaId;
	}

	public Long[] getBuildIds() {
		return buildIds;
	}

	public void setBuildIds(Long[] buildIds) {
		this.buildIds = buildIds;
	}

	@Override
	public String toString() {
		final StringBuffer sb = new StringBuffer("VoteBuildSelectRequest{");
		sb.append("voteId=").append(voteId);
		sb.append(", areaId=").append(areaId);
		sb.append(", buildIds=").append(buildIds == null ? "null" : Arrays.asList(buildIds).toString());
		sb.append('}');
		return sb.toString();
	}
}
